package com.example.shopping_web_back.service;

import com.example.shopping_web_back.mapper.ReceivePlaceMapper;
import com.example.shopping_web_back.pojo.ReceivePlace;
import com.example.shopping_web_back.service.impl.ReceivePlaceServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ReceivePlaceService implements ReceivePlaceServiceImpl {

    @Autowired
    private ReceivePlaceMapper receivePlaceMapper;

    @Override
    public List<ReceivePlace> searchReceivePlace(String customerName) {
        return receivePlaceMapper.searchReceivePlace(customerName);
    }

    @Override
    public ReceivePlace findReceivePlace(ReceivePlace receivePlace) {
        return receivePlaceMapper.findReceivePlace(receivePlace);
    }

    @Override
    public void addReceivePlace(ReceivePlace receivePlace) {
        receivePlaceMapper.addReceivePlace(receivePlace);
    }

    @Override
    public void updateReceivePlace(Integer id, ReceivePlace newReceivePlace) {
        receivePlaceMapper.updateReceivePlace(id, newReceivePlace);
    }

    @Override
    public void deleteReceivePlace(ReceivePlace receivePlace) {
        receivePlaceMapper.deleteReceivePlace(receivePlace);
    }
}
